<title>消息中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="#(assets)/js/jquery-2.2.4.min.js"></script>
#@checkToken()
<style> 
	body{font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif,"宋体";}
	*{margin:0;padding:0;}
	li{list-style-type:none;}
	select,input{-webkit-appearance:none;border:0px;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);   
	}
</style>

<body bgcolor="#f4f5f9" style="margin:0px;">
	<div style="height:50px;line-height:50px;border-bottom:1px solid #f0f0f0;background:#FFF">
		<div style="float:left;margin-left:20px;font-size:14px;color:#777">时间:</div>
		<div id="create_time" style="float:right;margin-right:20px;font-size:14px;color:#777"></div>
	</div>
	<div style="height:50px;line-height:50px;border-bottom:1px solid #f0f0f0;background:#FFF">
		<div style="float:left;margin-left:20px;font-size:14px;color:#777">类型:</div>
		<div id="type" style="float:right;margin-right:20px;font-size:14px;color:#777"></div>
	</div>
	<div style="height:50px;line-height:50px;border-bottom:1px solid #f0f0f0;background:#FFF">
		<div style="float:left;margin-left:20px;font-size:14px;color:#777">金额:</div>
		<div id="amount" style="float:right;margin-right:20px;font-size:14px;color:#777"></div>
	</div>
	<div style="height:50px;line-height:50px;border-bottom:1px solid #f0f0f0;background:#FFF">
		<div style="float:left;margin-left:20px;font-size:14px;color:#777">状态:</div>
		<div id="status" style="float:right;margin-right:20px;font-size:14px;color:#777"></div>
	</div>
	<div style="height:50px;line-height:50px;border-bottom:1px solid #f0f0f0;background:#FFF">
		<div style="float:left;margin-left:20px;font-size:14px;color:#777">备注:</div>
		<div id="summary" style="float:right;margin-right:20px;font-size:14px;color:#777"></div>
	</div>
<script>
	var id = GetRequest()["id"];
	var url = "/investLog/info?token=#(session.token??)&id="+id;
	$.getJSON(url, function(datalist) {
		console.log(datalist);
		var datainfo = datalist.data.item;
		var type = "";
		if(datainfo.type=="trade"){
			type="投资";
		}else if(datainfo.type=="amount"){
			type="回款";
		}else if(datainfo.type=="share"){
			type="分润";
		}else if(datainfo.type=="deposit"){
			type="充值";
		}else if(datainfo.type=="withdraw"){
			type="提现";
		}else if(datainfo.type=="withdraw_fee"){
			type="提现手续费";
		}else if(datainfo.type=="deposit_fee"){
			type="充值手续费";
		}
		if(datainfo.mode=="sub"){
			var fuhao = "-";
		}else if(datainfo.mode=="add"){
			var fuhao = "+";
		}
		if(datainfo.status=="success"){
			var status = "成功";
		}else if(datainfo.status=="process"){
			var status = "进行中";
		}else if(datainfo.status=="failed"){
			var status = "失败";
		}
		$("#summary").html(datainfo.summary);
		$("#status").html(status);
		$("#amount").html(fuhao+datainfo.amount);
		$("#type").html(type);
		$("#create_time").html(datainfo.create_time);
	});
	function GetRequest() {   
	   var url = location.search; //获取url中"?"符后的字串  
	   var theRequest = new Object();  
	   if (url.indexOf("?") != -1) {  
		  var str = url.substr(1);  
		  strs = str.split("&");  
		  for(var i = 0; i < strs.length; i ++) {  
			 theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);  
		  }  
	   }  
	   return theRequest;  
	}  
</script>
</body>